package com.homson.coreservice.servicecommon.response;


import com.homson.coreservice.servicecommon.enumeration.BaseCodeEnum;

import static com.homson.coreservice.servicecommon.enumeration.ResponseCodeEnum.*;

public class BaseResponse extends AbstractResponse{
   
    public BaseResponse(BaseCodeEnum code, String message){
        super(code,message);
    }
    public BaseResponse() {
    }
    
    public static BaseResponse ok(){
        return new BaseResponse(SUCCESS,"success");
    }
    public static BaseResponse fail(String msg){
        return new BaseResponse(ERROR,msg);
    }
    public static BaseResponse fail(BaseCodeEnum code,String msg){
        return new BaseResponse(code,msg);
    }
}
